Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added lacking mention of BINDTODEVICE for srt_config_add #2564

Merged
merged 1 commit into from
Dec 1, 2022

Conversation

ethouris
Copy link
Collaborator

@ethouris ethouris commented Dec 1, 2022

Fixes #2552

@maxsharabayko maxsharabayko added this to the v1.6.0 milestone Dec 1, 2022
@maxsharabayko maxsharabayko added the [docs] Area: Improvements or additions to documentation label Dec 1, 2022
@maxsharabayko maxsharabayko merged commit 37d44f4 into Haivision:master Dec 1, 2022
@maxsharabayko maxsharabayko added the Type: Maintenance Work required to maintain or clean up the code label Dec 1, 2022
@maxsharabayko
Copy link
Collaborator

The issue was posted by @nhuruiew as a discussion. Copying the text here to preserve it because the discussion will be deleted.


Hi

TL;DR in my understanding, SRTO_BINDTODEVICE has to be mentioned as a possible option in the documentation of function srt_config_add.

In the documentation here:
https://github.com/Haivision/srt/blob/master/docs/API/API-functions.md#srt_config_add
The option SRTO_BINDTODEVICE is not in the list.

However, if you follow this link
#1120
one of the bullets leads to this pull request with the description "...mainly required for supporting SRTO_BINDTODEVICE option"
#1314

the pull-request discussion has the following code example which we have tested to work (typo and obsolete comment corrected):

SRT_SOCKGROUPCONFIG data [] = {
    srt_prepare_endpoint( ... 1 ... ),
    srt_perpare_endpoint( ... 2 ... )
};

data[0].config = srt_create_config(); 
srt_config_add(data[0].config, SRTO_BINDTODEVICE, "eth0", 4);

data[1].config = srt_create_config();
srt_config_add(data[1].config, SRTO_BINDTODEVICE, "eth1", 4);

size_t len = sizeof data;
srt_connect_group(grp, data, len);

// client code must also delete the config objects
for (auto& d: data)
    srt_delete_config(d.config);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[docs] Area: Improvements or additions to documentation Type: Maintenance Work required to maintain or clean up the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants